package com.rimi.dao.impl;

import com.rimi.bean.Role;
import com.rimi.dao.RoleDao;
import com.rimi.util.JdbcUtil;

import java.util.List;

/**
 * @author chengliang
 */
public class RoleDaoImpl extends JdbcUtil implements RoleDao {

    @Override
    public Role selectRoleById(int roleId) {
        return executeQueryObject(Role.class,"select * from role_tb where role_id = ?",roleId);
    }

    @Override
    public List<Role> selectRoleAll() {
        return executeQueryList(Role.class,"select * from role_tb");
    }

}
